/**
 * @file misc_api.h
 * @brief 
 * @author  ()
 * @version 1.0
 * @date 2024-09-13
 * 
 * @copyright Copyright (C) 2019 Queclink Wireless Solutions (ShenZhen) Co., Ltd. All Rights Reserved.
 * 
 * @par 修改日志:
 * <table>
 * <tr><th>Date       <th>Version <th>Author  <th>Description
 * <tr><td>2024-09-13 <td>1.0     <td>     <td>内容
 * </table>
 */
#ifndef __MISC_API_H
#define __MISC_API_H

#include <stdint.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif

/**
 * @brief 软件版本结构体
 */
struct FW_VER_STRU
{
	/**
	 * @brief 
	 */
	char ver[32];	
};

/**
 * @brief 硬件版本结构体
 */
struct HW_VER_STRU
{
	/**
	 * @brief 
	 */
	char ver[32];
};


int32_t tbox_get_fw_version(struct FW_VER_STRU *p_fw_version);
int32_t tbox_get_hw_version(struct HW_VER_STRU *p_hw_version);
int32_t tbox_get_fw_builddate(char *p_date);
uint32_t tbox_get_fw_checksum(void);
int32_t tbox_system_reboot(uint32_t delay_reboot_ms);
int32_t tbox_system_poweroff(uint32_t delay_power_ms);
int32_t tbox_system_restore(uint32_t delay_reboot_ms);
int32_t tbox_get_sn(char *sn, uint32_t max_size);
int32_t tbox_set_sn(char *sn);
int32_t tbox_clr_sn(void);

char get_system_reboot_off_flag(void);


typedef enum{
	ELOG_DISABLE,
	ELOG_ENABLE,
}ELOG_SELECT_ENUM;
int32_t tbox_set_logctrl(uint8_t enable, uint8_t level, char *tag);

bool tbox_dqa_mode_get(void);
void tbox_dqa_mode_set(uint8_t status);
#ifdef __cplusplus
}
#endif

#endif // __MISC_API_H


